<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>时间的绑定</title>
        <script text="text/javascript" src="../js/vue.js"></script>
    </head>
    <body>
        <div id="first">
            <h1>{{name}}</h1>
            <button v-on:click="method1">点击</button>
            <button v-on:click="method2()">点击</button>
            <button v-on:click="method3($event,1)">点击</button>
        </div>
    </body>
   <script text="text/javascript">
        const vm = new Vue({
            el:'#first',
            data:{
                name:'数据的绑定',
                input:'输入',
                input2:'输入2',

            },
            methods:{
                method1(){
                    alert("点开了1")
                },
                method2(){
                    alert("点开了2")
                },
                method3(event,a){
                    alert("点开了3")
                    console.log(event,a)
                    
                }
            }
        })
        console.log(vm)
    </script>

</html>